#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
 double h;
 cin >> h;
 double ret = h;
 int n = 9;
 h/=2;
 int i =1;
 do
 {
 	ret+=2*h;
 	h/=2;
 	n--;
 }while(n);
 cout << ret << endl;
 cout << h;
  
  
}

